<template>
	<view>
		<view class="item" v-for="(item,index) in askData" :key="index"
			@click="$u.route('/pagesIndex/askmain/askmain',{id:item.id})">
			<view class="left">
				<view style="display: flex;flex-direction: row;align-items: flex-start;">
					<u-icon v-if="item.isZhiding=='1'" name="/static/images/top.png" size="40"
						style="margin-right: 10rpx;"></u-icon>
					<view class="item-title">{{item.name}}</view>
				</view>
				<block v-if="item.type=='房屋求购'">
					<view class="price" v-if="item.highPrice||item.lowPrice">
						{{item.lowPrice}}-{{item.highPrice}}万元
					</view>
				</block>
				<block v-if="item.type=='房屋求租'">
					<view class="price" v-if="item.highPrice||item.lowPrice">
						{{item.lowPrice}}-{{item.highPrice}}元/月
					</view>
				</block>
				<block v-if="item.type=='车辆求购'">
					<view class="price" v-if="item.highPrice||item.lowPrice">
						{{item.lowPrice}}-{{item.highPrice}}万元
					</view>
				</block>
				<block v-if="item.type=='物品求购'">
					<view class="price" v-if="item.highPrice||item.lowPrice">
						{{item.lowPrice}}-{{item.highPrice}}元
					</view>
				</block>
				<view class="bot">
					<view class="user">
						<u-image shape="circle" width="35rpx" height="35rpx" :src="item.member && item.member.image"></u-image>
						<text style="margin-left: 10rpx;">{{item.member && item.member.nickname}}</text>
					</view>
					<view class="">
						<text>{{item.createTime}}</text>
					</view>
				</view>
			</view>
			<u-image v-if="item.picList && item.picList.length>0" width="220rpx" height="200rpx" :src="item.picList[0]">
			</u-image>
		</view>
	</view>
</template>

<script>
	export default {
		name: "askItem",
		props: {
			askData: {
				type: Array,
				default: []
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss" scoped>
	.item {
		display: flex;
		flex-direction: row;
		padding: 20rpx;
		background-color: white;
		border-bottom: 1rpx solid #e6e6e6;
		min-height: 200rpx;

		.left {
			flex: 1;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			padding-right: 20rpx;

			.item-title {
				font-size: 32rpx;
				color: #333333;
				font-weight: 600;
				word-break: break-all;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
				overflow: hidden;
			}

			.price {
				font-size: 30rpx;
				color: red;
				font-weight: 600;
			}

			.bot {
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: space-between;
				font-size: 28rpx;
				color: #666666;

				.user {
					display: flex;
					flex-direction: row;
					align-items: center;
				}
			}
		}
	}
</style>
